/**
 * 
 */
package com.heer.RD.projecthour.page;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.form.HiddenField;
import org.apache.wicket.model.Model;
import org.apache.wicket.spring.injection.annot.SpringBean;
import org.springframework.jdbc.core.JdbcTemplate;

import com.heer.RD.auth.AuthenticatedIF;
import com.heer.RD.auth.HeerSession;
import com.heer.RD.projecthour.page.include.FooterPanel;
import com.heer.RD.projecthour.page.include.HeaderPanel;
import com.heer.RD.projecthour.page.include.NavPanel;
import com.heer.RD.projecthour.pojo.ProjectDTO;
import com.heer.RD.projecthour.pojo.UserInfoDTO;
import com.heer.RD.projecthour.service.ProjHourService;
import com.heer.joss.persistence.IBaseDAO;

/**
 * @author ZhaoZehui
 *
 */
public class BasePage extends WebPage implements AuthenticatedIF {

	
	public BasePage() {
		add(new HiddenField("currentMenuId", new Model<String>(this.getPageClass().getName().replaceAll("\\.", "_")))
		.setMarkupId("currentMenuId")
		.setOutputMarkupId(true));
		
		add(new HeaderPanel("header", this));
		add(new NavPanel("nav", this));
		add(new FooterPanel("footer", this));
	}
	
	public UserInfoDTO getUser() {
		return HeerSession.session().getUser();
	}
	
	@SpringBean
	private ProjHourService mainService;

	public ProjHourService getMainService() {
		return mainService;
	}

	public void setMainService(ProjHourService mainService) {
		this.mainService = mainService;
	}
	
	

}
